<?php

namespace common\models\kingdee;

use Yii;

/**
 * This is the model class for table "T_HR_PERSONPHOTO".
 *
 * @property string $FID
 * @property resource $FIMAGEDATA
 * @property string $FPERSONID
 * @property integer $FSOURCEIMAGEHEIGHT
 * @property integer $FSOURCEIMAGEWIDTH
 * @property string $FIMAGECONTENTTYPE
 * @property resource $FIMAGEDATASOURCE
 * @property integer $FISINFILE
 */
class HrPersonPhoto extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'T_HR_PERSONPHOTO';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_hr');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['FID'], 'required'],
            [['FSOURCEIMAGEHEIGHT', 'FSOURCEIMAGEWIDTH', 'FISINFILE'], 'integer'],
            [['FID', 'FPERSONID'], 'string', 'max' => 44],
            [['FIMAGEDATA', 'FIMAGEDATASOURCE'], 'string', 'max' => 4000],
            [['FIMAGECONTENTTYPE'], 'string', 'max' => 10],
            [['FID'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'FID' => Yii::t('app', 'Fid'),
            'FIMAGEDATA' => Yii::t('app', 'Fimagedata'),
            'FPERSONID' => Yii::t('app', 'Fpersonid'),
            'FSOURCEIMAGEHEIGHT' => Yii::t('app', 'Fsourceimageheight'),
            'FSOURCEIMAGEWIDTH' => Yii::t('app', 'Fsourceimagewidth'),
            'FIMAGECONTENTTYPE' => Yii::t('app', 'Fimagecontenttype'),
            'FIMAGEDATASOURCE' => Yii::t('app', 'Fimagedatasource'),
            'FISINFILE' => Yii::t('app', 'Fisinfile'),
        ];
    }
}
